Repository navigation
Use exact eV and u constants, add the stone plural, document da - #34
Merged
Merged
Conversation
- electronvolt: 1.602176634e-19 J (exact since the 2019 SI redefinition) - atomic_mass_unit: 1.66053906892e-27 kg (CODATA 2022) - stone: recognise the plural "stones" - A bare "da" stays a deci-are; documented and pinned by a test Fixes #23 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The v0.1 parity check flagged the 12 eV/u probes (10 eV, 10 electronvolt, 10 u, 10 atomic_mass_unit in strict_all, natural and legacy modes), which change on purpose with the exact constants. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #23.
Changes
In
physical_quantities/data.py:1.60218e-19 J1.602176634e-19 J(exact since the 2019 SI redefinition)1.66054e-27 kg1.66053906892e-27 kg(CODATA 2022)("stones",)da: a baredais still read as d (deci) + a (are), a deci-are of 10 m², not as the deca prefix on its own. Grades don't change. The reading is now documented in a comment next toare, pinned by a test and noted in the CHANGELOG. Feedback warning about it can come in a later PR.Tests
TestUnitTableValuesintests/test_api.py:1 eV,1 u,2 stonesand1 daagainst their SI values (relative tolerance 1e-12), and2 stonesparses with unitstone.mainand pass with this change.physical_quantitiessuite passes (547 tests), andruff check,ruff format --checkandmypypass.Related
user.mdphysical-quantity reference is out of date with the unit table compareExpressions#314 (user.md unit reference) waits on this.🤖 Generated with Claude Code